/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow: hidden; /* 禁止页面滚动 */
}

/* 主容器 - 固定尺寸 */
.app-container {
    width: 1200px;
    height: 800px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    margin: 20px auto;
    overflow: hidden;
}

/* 顶部工具栏 */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.app-title i {
    font-size: 20px;
}

.app-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 16px;
}

/* 主内容区域 */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 内容区块 */
.content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #e5e5e5;
    min-height: 0; /* 允许flex子项收缩 */
}

.content-section:last-child {
    border-bottom: none;
}

/* 区块头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.section-title i {
    color: #667eea;
    font-size: 18px;
}

.section-count {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* 内容列表 - 支持横向滚动 */
.content-list {
    flex: 1;
    padding: 20px 24px;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    min-height: 0;
}

/* 滚动条样式 */
.content-list::-webkit-scrollbar {
    height: 8px;
}

.content-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.content-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.content-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 空状态 */
.empty-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    min-height: 200px;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state p {
    line-height: 1.6;
    text-align: center;
}

/* 项目卡片样式（为后续添加项目准备） */
.item-card {
    flex-shrink: 0;
    width: 160px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.item-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.item-card .item-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 24px;
    color: #667eea;
}

.item-card .item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
    word-break: break-all;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-card .item-path {
    font-size: 12px;
    color: #999;
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-card .item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover .item-actions {
    opacity: 1;
}

.item-actions .action-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.item-actions .action-icon:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

/* 响应式调整 */
@media (max-width: 1280px) {
    .app-container {
        width: 95vw;
        height: 90vh;
        margin: 2.5vh auto;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 12px 16px;
    }
    
    .app-title {
        font-size: 16px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .section-header {
        padding: 12px 16px;
    }
    
    .content-list {
        padding: 16px;
    }
    
    .item-card {
        width: 140px;
    }
}
